﻿using System;
using System.Linq;
using System.Text;

namespace NHibernate.Audit.Integration.Basic
{
    public class BasicTestEntity1
    {

        public const string MAPPING_RESOURCE_NAME = "NHibernate.Audit.Integration.Basic.BasicTestEntity1.hbm.xml";
        public const string DESERIALIZED_MAPPING = "NHibernate.Audit.Integration.Basic.BasicTestEntity1.dat";

        public virtual Guid Revision { get; set; }

        private long id;
        private long long1;
        private string str1;

        public virtual long Id
        {
            get { return id; }
            set { id = value; }
        }

        public virtual string Str1
        {
            get { return str1; }
            set { str1 = value; }
        }

        public virtual long Long1
        {
            get { return long1; }
            set { long1 = value; }
        }

        public override bool Equals(object obj)
        {
            if (ReferenceEquals(null, obj)) return false;
            if (ReferenceEquals(this, obj)) return true;
            if (obj.GetType() != typeof(BasicTestEntity1)) return false;
            return Equals((BasicTestEntity1)obj);
        }

        public bool Equals(BasicTestEntity1 other)
        {
            if (ReferenceEquals(null, other)) return false;
            if (ReferenceEquals(this, other)) return true;
            return other.id == id && Equals(other.str1, str1) && other.long1 == long1;
        }

        public override int GetHashCode()
        {
            unchecked
            {
                int result = id.GetHashCode();
                result = (result * 397) ^ (str1 != null ? str1.GetHashCode() : 0);
                result = (result * 397) ^ long1.GetHashCode();
                return result;
            }
        }
    }
}